import { createApp } from 'vue'
import { createPinia } from 'pinia'
import { zhCn } from 'element-plus/es/locales.mjs'
// import './style.css'
import router from './router'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import messageBox from './utils/messageBox'
//createApp(App).mount('#app')
const pinia = createPinia()
const app  = createApp(App);
app.use(router).use(ElementPlus,{locale:zhCn,}).use(pinia).mount('#app')
//全局注册图标，在页面可直接使用
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }
//全局注册
app.config.globalProperties.$messageBox = messageBox